﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HttpOperationMethod.aspx.cs"
    Inherits="WebAppDemo.HttpOperationMethod1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

    <script src="Scripts/jquery-2.0.1.js" type="text/javascript"></script>

    <%--    <script src="Scripts/jquery-2.0.0-vsdoc.js" type="text/javascript"></script>--%>

    <script type="text/javascript">
	    $(document).ready(function() {
		    $("#btnPost").click(function() {
			    $.ajax({
				    type: "POST",
				    url: "HttpOperationMethod.ashx",
				    data: {
					    "Name": "chenxm"
				    },
				    success: function(msg) {
					    alert(msg);
				    }
			    });
		    });
		    $("#btnPut").click(function() {
			    $.ajax({
				    type: "put",
				    url: "HttpOperationMethod.ashx",
				    data:{
                        "Count":"1"
					},
				    success: function(msg) {
					    alert(msg);
				    }
			    });
		    }); 
		    $("#btnDelete").click(function() {
			    $.ajax({
				    type: "delete",
				    url: "HttpOperationMethod.ashx",
				    data: {
					    "Id": "12345"
				    },
				    success: function(msg) {
					    alert(msg);
				    }
			    });
		    });
	    });

    </script>

</head>
<body>
    <form id="form1">
    <div>
        <input value="POST" id="btnPost" type="button" />
        <input value="PUT" id="btnPut" type="button" />
        <input value="DELETE" id="btnDelete" type="button" />
    </div>
    </form>
</body>
</html>
